<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<table width="1004" border="0" align="center" cellpadding="0" cellspacing="10" bgcolor="#FFFFFF">
    <tr>
        <td align="center" valign="top">
            <table height="30" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td></td>
                </tr>
            </table>
            <form action="/xiugaimima" method="post" id="lg-form" name="lg-form" >
                <table width="46%" border="0" cellpadding="5" cellspacing="1" bgcolor="#E0EDB7">
                    <tr>
                        <td height="30" colspan="2" align="center" background="themes/nzblue/images/nzcms/list_bg.gif" class="white14B">修改密码</td>
                    </tr>
                    <tr>
                        <td width="80" height="50" align="right" bgcolor="#FFFFFF">原密码：</td>
                        <td bgcolor="#FFFFFF"><input type="password" name="password" style="width: 260px; height: 30px"
                                                     placeholder="请输入原密码" /></td>
                    </tr>
                    <tr>
                        <td height="50" align="right" bgcolor="#FFFFFF">用户新密码：</td>
                        <td bgcolor="#FFFFFF"><input type="password" name="newpassword" style="width: 260px; height: 30px"
                                                     id="newpassword" placeholder="请输入用户新密码" /></td>
                    </tr>
                    <tr>
                        <td height="50" align="right" bgcolor="#FFFFFF">确认用户新密码：</td>
                        <td bgcolor="#FFFFFF"><input type="password" name="newnewpassword" style="width: 260px; height: 30px" id="newnewpassword"
                                                placeholder="请重复输入用户新密码" /></td>
                    </tr>
                    <tr>
                        <td bgcolor="#FFFFFF" colspan="2" align="center"><label> <input type="submit" name="Submit"
                                                                                        value="提交" /> &nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" name="Submit2" value="重置" />
                        </label></td>
                    </tr>
                </table>
            </form>

        </td>
    </tr>
</table>
<script>
    var lgform=document.getElementById("lg-form");
    var password=document.getElementById("newpassword");
    var newPassword=document.getElementById("newnewpassword");
    lgform.onsubmit=function(){
        if(password.value=="" || password.value==null){
            alert("新密码不能为空,请输入");
            return false;
        }else if(newPassword.value=="" || newPassword.value==null){
            alert("确认密码不能为空,请输入");
            return false;
        }else if(password.value!=newPassword.value){
            alert("两次密码不一样,请重新输入");
            password.value="";
            newPassword.value="";
            return false;
        }else{
            return true;
        }
    }
</script>

</body>
</html>